Resource

interface Resource : Parcelable

A resource in a media item.

A media resource instance is a parcelable object, and as such may be used with android's parcelable-supporting utilities, such as conveying media items in Intent (see Intent.putExtra) or in Bundle (see Bundle.putParcelable) objects.

Note however that, since a media resource is linked to its media item parent, serializing a media resource to a parcel amounts to serializing its media item parent, plus an index to the resource in that parent. As a consequence, serializing multiple resources from the same media is rather expensive memory-wise; for this use case, consider using a MediaResourceList instance, which provides an optimized way to serialize an heterogeneous collection of media resources.

Types

Link copied to clipboard

Format of a resource.

Link copied to clipboard

Type of a resource.

Properties

Link copied to clipboard

Available metadata type(s)

Link copied to clipboard

Available media tracks.

Link copied to clipboard
abstract val creationDate: Date

Resource creation date.

Link copied to clipboard
@get:IntRange(from = 0)
abstract val duration: Long

Video duration, in milliseconds.

Link copied to clipboard

Resource format.

Link copied to clipboard
abstract val isSigned: Boolean

Whether this resource is signed.

Link copied to clipboard
abstract val location: Location?

Location where the resource was created.

Link copied to clipboard
abstract val media: MediaItem

Resource's media item parent.

Link copied to clipboard
@get:IntRange(from = 0)
abstract val size: Long

Resource size, in bytes.

Link copied to clipboard
abstract val storage: UserStorage.Type?

Remote storage type.

Link copied to clipboard

Resource type.

Link copied to clipboard
abstract val uid: String

Resource unique identifier.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)